<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var list = new Array(65, 22, 88, 41, 55, 66, 12, 39, 99);
        for (var i = 1; i < list.length; i++) {
            for (var j = 0; j < list.length - i; j++) {
                if (list[j] < list[j + 1]) {
                    var change = 0;
                    change = list[j];
                    list[j] = list[j + 1];
                    list[j + 1] = change;
                }
            }
            alert(list);
        }
    </script>
</body>

</html>